<template>
  <div>
    <tiny-button @click="openDawer">抽屉按钮</tiny-button>
    <!-- <vo-drawer :title="data.drawerConfig.title" v-model:isShow="data.drawerConfig.isDrawer"> </vo-drawer> -->
    <tiny-button @click="testclick">抽屉按钮</tiny-button>
    <tiny-date-picker
      v-model="data.dd"
      type="datetimerange"
      value-format="timestamp"
      start-placeholder="开始日期"
      end-placeholder="结束日期"
    ></tiny-date-picker>
    
  </div>
</template>

<script setup>
  import {reactive} from 'vue';
  import { TinyDatePicker } from '@opentiny/vue'
  const data = reactive({
    dd: [ new Date(),  new Date()],
    isShow: false, 
    drawerConfig: {title: '', isDrawer: false}
  });
  let date = new Date();
  // data.dd = [
  //   date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate(),
  //   date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate(),
  // ];
  const openDawer = () => {
    data.drawerConfig.title = '测试标题';
    data.drawerConfig.isDrawer = true;
  };
  const testclick = ()=>{
    console.log(data.dd) 
  }
</script>
<style lang="scss" scoped></style>
